﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVVMDemo
{
    public abstract class ViewModelBase
    {

        IDbConnection _dbContext = null;        

        public IDbConnection DbContext
        {
            get { return _dbContext; }
            set { _dbContext = value; }
        }


        public void Dispose()
        {
            // 释放db资源
            DbContext.Close();
        }
    }


}
